package com.rumo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import io.swagger.annotations.Api;

@Controller
@Api(description="首页管理")
public class IndexController {
	
	//spring4.x之后提供两个 @GetMapping @PostMapping @RestController
	
	@GetMapping("/index")
	public String index() {
		return "index";
	}
	
	@GetMapping("/detail/{id}")
	public String detail(@PathVariable("id")Integer id) {
		return "detail";
	}
	
}
